package com.hbdl.web.sys.controller;

import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hbdl.common.utils.PMSUtils;
import com.hbdl.web.sys.model.User;
import com.hbdl.web.sys.utils.SysUserUtils;

/**
 * 首页控制器
 * @author ql
 *
 */
@Controller
public class IndexController {
	private final Logger logger = LoggerFactory.getLogger(this.getClass());

	
	@RequestMapping(value = "/")
	public String index(Model model, HttpServletRequest request) {
//		User user = SysUserUtils.getCacheLoginUser();
//		if( user == null ){
//			return "redirect:/login";
//		}
		/*
		model.addAttribute("menuList", JSON.toJSONString(SysUserUtils.getUserMenus()));
		model.addAttribute("sysUser",SysUserUtils.getSessionLoginUser());
		 */
		logger.debug("跳转至首页");
		
		String view = "index";
		return view;
	}
	
}
